This is a C++ error dialog handler, with overloaded functions to allow customizing what information appears in the dialog box. Also includes 'SANITY_CHECK' macro which sends error strings to a debugger instead.
You can test for SANITY_CHECK in your own code and use it to implement exhaustive checking of routine parameters.